package com.atguigu.gmall.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller //不需要返回json数据
public class LoginController {

    /**
     * 渲染登录页面
     * @param model
     * @param originUrl
     * @return
     */
    @GetMapping("/login.html")
    public String loginHtml(Model model, @RequestParam("originUrl") String originUrl){
        model.addAttribute("originUrl", originUrl);
        return "/login";
    }


}